opengl in a quake3 dll
hm I was thinking tonight (yes it hurted ), would it be possible to render some opengl from inside a quake dll without changing the engine ?
I tried to set up some opengl stuff in rtcw cgame, it "worked"
CG_DrawActiveFrame in cg_view.c
GetCursorPos(&pc);
testink = WindowFromPoint(pc);
hdc = GetWindowDC(testink);
hRC = wglCreateContext (hdc);
wglMakeCurrent (hdc, hRC);
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity ();
cg_local.h:
#include <windows.h>
#include <GL/GL.h>
#include <GL/glu.h>
HWND testink;
HDC hdc;
POINT pc;
HGLRC hRC;
and in ui_shared.h
replace all the Rectangle in Q_Rectangle
and it renders something like this:
http://www.d-e-sign.be/files/rtcw-gl/shot0020.jpg => this one is when the "real" opengl stuff is in cg_init() (in cg_main.c)
http://www.d-e-sign.be/files/rtcw-gl/shot0021.jpg
yep, ugly stoopid "gl" code, it was just a fast test
but I supose this will not work as I hope =)
maybe some opengl dude may make this working
fretn
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement