Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

OpenGL and Delphi

Posted on 1997-09-17
1
Medium Priority
?
518 Views
Last Modified: 2010-04-03
I've been trying to use the OpenGL libraries as shipped with  win95 OSR2 with D3 and it isn't playing. The problem I'm getting is that the creation of the rendering context is failing. Has anyone got any ideas of what is going wrong.

Also, does anyone know where I can find a version of the glaux libraries for Delphi or C++ Builder? (preferably both)

Thanks

 Adam
0
Comment
Question by:AJFleming
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
JimBob091197 earned 400 total points
ID: 1345324
I presume the call that's failing is the call to wglCreateContext.

If so, try the following BEFORE the call to wglCreateContext:
1)  Declare the following variables:
  pfd: TPixelFormatDescriptor;
  nPixelFormat: Integer;

2) Execute the following code:
  FillChar(pfd, SizeOf(pfd), 0);
 
  with pfd do
    begin
      nSize     := sizeof(pfd);
      nVersion  := 1;
      dwFlags   := PFD_DRAW_TO_WINDOW or PFD_SUPPORT_OPENGL;
      iPixelType:= PFD_TYPE_RGBA;
      cColorBits:= 24;
      cDepthBits:= 32;
      iLayerType:= PFD_MAIN_PLANE;
    end;
 
  nPixelFormat := ChoosePixelFormat(MyCanvas.Handle, @pfd);
  SetPixelFormat(MyCanvas.Handle, nPixelFormat, @pfd);

3) Now call wglCreateContext:
  hrc := wglCreateContext(MyCanvas.Handle);

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question