This topic is now archived and is closed to further replies.


opengl in a quake3 dll

Recommended Posts

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: => this one is when the "real" opengl stuff is in cg_init() (in cg_main.c) 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

Share this post

Link to post
Share on other sites