• Advertisement


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

opengl in a quake3 dll

This topic is 5304 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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: 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

Share this post

Link to post
Share on other sites

  • Advertisement