Модераторы: Poseidon, Snowy, bems, MetalFan
  

Поиск:

Ответ в темуСоздание новой темы Создание опроса
> 3D текст, 3D текст 
:(
    Опции темы
Budy
  Дата 10.6.2004, 15:02 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 616
Регистрация: 6.2.2004
Где: Екатеринбург

Репутация: 1
Всего: 2



:Приветствую
Кто-нить скиньте примерчик крутящегося объемного текста, похожего (или в точности повторяющего) заставку в Windows'е. Или хотябы ссылочку. И скажите, чего для этого надо качать, ну библиотеки там какие, а то я недавно все свое добро посеял.
Заранее благодарю.


--------------------
Как ты назовешь свой корабль, так на нем и напишут
user posted image
PM MAIL WWW ICQ   Вверх
Guest
Дата 10.6.2004, 15:07 (ссылка)    |    (голосов: 0) Загрузка ... Загрузка ... Быстрая цитата Цитата


Unregistered











DirectX или OpenGL - библиотеку и в путь tounge.gif
  Вверх
Budy
Дата 10.6.2004, 15:29 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 616
Регистрация: 6.2.2004
Где: Екатеринбург

Репутация: 1
Всего: 2



Ну дайте же примерчик! mad.gif


--------------------
Как ты назовешь свой корабль, так на нем и напишут
user posted image
PM MAIL WWW ICQ   Вверх
devmstr
Дата 11.6.2004, 16:53 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Developer
**


Профиль
Группа: Участник
Сообщений: 879
Регистрация: 28.4.2004
Где: Ukraine

Репутация: 2
Всего: 11



Ни так это просто, как ты думаешь! wink.gif


--------------------
Think different ©Steve Jobs 
user posted image
PM MAIL WWW   Вверх
Budy
Дата 19.7.2004, 19:38 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 616
Регистрация: 6.2.2004
Где: Екатеринбург

Репутация: 1
Всего: 2



А чего же тут сложного??! wink.gif


--------------------
Как ты назовешь свой корабль, так на нем и напишут
user posted image
PM MAIL WWW ICQ   Вверх
Pakshin A. S.
Дата 19.7.2004, 19:42 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
****


Профиль
Группа: Участник Клуба
Сообщений: 5056
Регистрация: 16.2.2003

Репутация: 21
Всего: 61



Текстик, крутящийся... может я чего-то не понимяю из-за годков, но можно и вывернуться наизнанку: gif анимиция + обозреватель интернета (WebBrowser) или *avi + Animate (но это при большом свободном дисковом пространстве). smile.gif
PM   Вверх
Borland_Delphi_6
Дата 19.7.2004, 22:37 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


LoneLINEss
****


Профиль
Группа: Участник Клуба
Сообщений: 2509
Регистрация: 5.11.2002
Где: in fortune dreams ...

Репутация: нет
Всего: 20



Хех, меня это тоже интересует sad.gif Что-нибудь хотя бы! butbut.gif


--------------------
Blind Guardian Fan :: BMSTU Student :: A polar bear is a rectangular bear after a coordinate transform.

Мои фотографии
PM MAIL WWW   Вверх
Budy
Дата 21.7.2004, 11:05 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 616
Регистрация: 6.2.2004
Где: Екатеринбург

Репутация: 1
Всего: 2



Да нет же, не анимация. Ведь есть всякие исходники с кубиками. А вот с тестом еще не разу не видел. Вы уж помогите пжлста! smile.gif
Добавлено @ 11:07
Ведь Объемный текст.scr в Винде ну никак не анимация hmmm.gif


--------------------
Как ты назовешь свой корабль, так на нем и напишут
user posted image
PM MAIL WWW ICQ   Вверх
Cheba
Дата 21.7.2004, 22:31 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


pointless one
***


Профиль
Группа: Vingrad developer
Сообщений: 1777
Регистрация: 27.11.2003
Где: /dev/null

Репутация: 1
Всего: 62



Outline Fonts (TrueType) in OpenGL
Bitmap Fonts in OpenGL Хотя это тебе вряд ли удастся повращать.
Tutorial on using FreeType Fonts in OpenGL

Все исходники на Сях, но я же разобрался, хотя и не знаю С. smile.gif Начать есть с чего.
PM MAIL ICQ   Вверх
Budy
Дата 22.7.2004, 20:06 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 616
Регистрация: 6.2.2004
Где: Екатеринбург

Репутация: 1
Всего: 2



Не, мне как бы Си не подходит smile.gif
Может еще чегонить есть?


--------------------
Как ты назовешь свой корабль, так на нем и напишут
user posted image
PM MAIL WWW ICQ   Вверх
Cheba
Дата 23.7.2004, 15:09 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


pointless one
***


Профиль
Группа: Vingrad developer
Сообщений: 1777
Регистрация: 27.11.2003
Где: /dev/null

Репутация: 1
Всего: 62



Ишь какие! smile.gif
Я-то разбирался по сёвых исходниках...
Не торопите меня и я отищу вам и дэлфишные сорцы. Ближе к ночи. smile.gif
PM MAIL ICQ   Вверх
Borland_Delphi_6
Дата 23.7.2004, 15:11 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


LoneLINEss
****


Профиль
Группа: Участник Клуба
Сообщений: 2509
Регистрация: 5.11.2002
Где: in fortune dreams ...

Репутация: нет
Всего: 20



Cheba
Было бы здорово! thumbs-up.gif notify.gif


--------------------
Blind Guardian Fan :: BMSTU Student :: A polar bear is a rectangular bear after a coordinate transform.

Мои фотографии
PM MAIL WWW   Вверх
Cheba
Дата 23.7.2004, 23:14 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


pointless one
***


Профиль
Группа: Vingrad developer
Сообщений: 1777
Регистрация: 27.11.2003
Где: /dev/null

Репутация: 1
Всего: 62



Долго искал свои исходники. Перерыл всю мою библиотеку сорцев. Не нашел. sad.gif
Зашел на NeHe по выше указаному линку. Докрутил страницу до конца, а там... Ба!
Цитата
* DOWNLOAD Delphi Code For This Lesson.


Вот что значит внимательность. wink.gif

lesson14.dpr
Код
program lesson14;

//
// This code was created by Jeff Molofee '99
//
// If you've found this code useful, please let me know.
//
// Visit me at www.demonews.com/hosted/nehe
//
// Translation to Delphi by Marc Aarts ([email protected])
//

uses
 Windows,
 Messages,
 OpenGL;

{$R *.RES}

var
 h_RC : HGLRC;                                  // Permanent Rendering Context
 h_DC : HDC;                                  // Private GDI Device Context

 keys : array [0..255] of BOOL;                        // Array Used For The Keyboard Routine

 base : GLuint;                   // Base Display List For The Font Set
 rot : GLfloat;                   // Used To Rotate The Text

procedure BuildFont;                   // Build Our Bitmap Font
var font: HFONT;                                 // Windows Font ID
   gmf : array [0..255] of GLYPHMETRICSFLOAT;  // Address Buffer For Font Storage
begin
 base := glGenLists(256);                        // Storage For 96 Characters
 font := CreateFont(-12,           // Height Of Font
      0,            // Width Of Font
      0,            // Angle Of Escapement
      0,            // Orientation Angle
      FW_BOLD,                  // Font Weight
      0,                   // Italic
      0,                   // Underline
      0,                   // Strikeout
      ANSI_CHARSET,          // Character Set Identifier
      OUT_TT_PRECIS,                 // Output Precision
      CLIP_DEFAULT_PRECIS,         // Clipping Precision
      ANTIALIASED_QUALITY,         // Output Quality
      FF_DONTCARE or DEFAULT_PITCH,      // Family And Pitch
      'Comic Sans MS');          // Font Name

 SelectObject(h_DC, font);                  // Selects The Font We Want

 wglUseFontOutlines( h_DC,    // Select The Current DC
                       0,    // Starting Character
                       255,    // Number Of Display Lists To Build
                       base,    // Starting Display Lists
                       0.0,    // Deviation From The True Outlines
                       0.2,    // Font Thickness In The Z Direction
                       WGL_FONT_POLYGONS,  // Use Polygons, Not Lines
                       @gmf);    // Address Of Buffer To Recieve Data

end;

procedure KillFont;                       // Delete The Font
begin
 glDeleteLists(base, 256);                   // Delete All 96 Characters
end;

procedure glPrint(text : pchar);                 // Custom GL "Print" Routine
begin
 if (text = '') then              // If There's No Text
         Exit;             // Do Nothing

 glPushAttrib(GL_LIST_BIT);    // Pushes The Display List Bits
 glListBase(base);     // Sets The Base Character
 glCallLists(length(text), GL_UNSIGNED_BYTE, text); // Draws The Display List Text
 glPopAttrib();          // Pops The Display List Bits
end;

procedure InitGL(Width: GLsizei; Height: GLsizei); // This Will Be Called Right After The GL Window Is Created
var fWidth, fHeight  : GLfloat;
begin
 glClearColor(0.0, 0.0, 0.0, 0.0);          // Clear The Background Color To Black
 glClearDepth(1.0);            // Enables Clearing Of The Depth Buffer
 glDepthFunc(GL_LESS);            // The Type Of Depth Test To Do
 glEnable(GL_DEPTH_TEST);           // Enables Depth Testing
 glShadeModel(GL_SMOOTH);           // Enables Smooth Color Shading

 glMatrixMode(GL_PROJECTION);           // Select The Projection Matrix
 glLoadIdentity();            // Reset The Projection Matrix       // Reset The Projection Matrix

 fWidth := Width;
 fHeight := Height;
 gluPerspective(45.0, fWidth/fHeight,0.1,100.0); // Calculate The Aspect Ratio Of The Window

 glMatrixMode(GL_MODELVIEW);    // Select The Modelview Matrix

 BuildFont();      // Build The Font
 glEnable(GL_LIGHT0);     // Enable Default Light (Quick And Dirty)
 glEnable(GL_LIGHTING);    // Enable Lighting
 glEnable(GL_COLOR_MATERIAL);    // Enable Coloring Of Material
end;

procedure ReSizeGLScene(Width: GLsizei; Height: GLsizei);
var
 fWidth, fHeight: GLfloat;
begin
 if (Height=0) then Height:=1;                         // Prevent A Divide By Zero If The Window Is Too Small

 glViewport(0, 0, Width, Height);                      // Reset The Current Viewport And Perspective Transformation

 glMatrixMode(GL_PROJECTION);
 glLoadIdentity();

 fWidth := Width;
 fHeight := Height;
 gluPerspective(45.0, fWidth/fHeight, 0.1, 100.0);
 glMatrixMode(GL_MODELVIEW);
end;

procedure DrawGLScene();
begin
 glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);  // Clear The Screen And The Depth Buffer
 glLoadIdentity();          // Reset The View
 glTranslatef(0.0,0.0,-10.0);       // Move One Unit Into The Screen
 glRotatef(rot,1.0,0.0,0.0);       // Rotate On The X Axis
 glRotatef(rot*1.2,0.0,1.0,0.0);      // Rotate On The Y Axis
 glRotatef(rot*1.4,0.0,0.0,1.0);      // Rotate On The Z Axis
 glTranslatef(-3.5,0.0,0.0);       // Move To The Left Before Drawing
 // Pulsing Colors Based On The Rotation
 glColor3f(1.0*(cos(rot/20.0)),1.0*(sin(rot/25.0)),1.0-0.5*(cos(rot/17.0)));
 glPrint('OpenGL With NeHe');       // Print GL Text To The Screen
 glColor3f(0.0,0.0,1.0);        // Make The Text Blue
 rot := rot + 0.1;            // Increase The Rotation Variable
end;

function WndProc(hWnd: HWND; message: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
var
 Screen: TRECT;
 PixelFormat: GLuint;
const
 pfd: PIXELFORMATDESCRIPTOR = (
     nSize: sizeof( PIXELFORMATDESCRIPTOR ); // Size Of This Pixel Format Descriptor
     nVersion: 1;                // Version Number (?)
     dwFlags: PFD_DRAW_TO_WINDOW // Format Must Support Window
     or PFD_SUPPORT_OPENGL     // Format Must Support OpenGL
     or PFD_DOUBLEBUFFER;      // Must Support Double Buffering
     iPixelType: PFD_TYPE_RGBA;  // Request An RGBA Format
     cColorBits: 16;             // Select A 16Bit Color Depth
     cRedBits: 0;                // Color Bits Ignored (?)
     cRedShift: 0;
     cGreenBits: 0;
     cBlueBits: 0;
     cBlueShift: 0;
     cAlphaBits: 0;              // No Alpha Buffer
     cAlphaShift: 0;             // Shift Bit Ignored (?)
     cAccumBits: 0;              // No Accumulation Buffer
     cAccumRedBits: 0;           // Accumulation Bits Ignored (?)
     cAccumGreenBits: 0;
     cAccumBlueBits: 0;
     cAccumAlphaBits: 0;
     cDepthBits: 16;             // 16Bit Z-Buffer (Depth Buffer)
     cStencilBits: 0;            // No Stencil Buffer
     cAuxBuffers: 0;             // No Auxiliary Buffer (?)
     iLayerType: PFD_MAIN_PLANE; // Main Drawing Layer
     bReserved: 0;               // Reserved (?)
     dwLayerMask: 0;             // Layer Masks Ignored (?)
     dwVisibleMask: 0;
     dwDamageMask: 0
 );

begin
 Result := 0;
case (message) of     // Tells Windows We Want To Check The Message
   WM_CREATE:
     begin
       h_DC := GetDC(hWnd);  // Gets a Device Context For The Window
       PixelFormat := ChoosePixelFormat(h_DC, @pfd);  // Finds The Closest Match To The Pixel Format We Set Above

       if (PixelFormat=0) then
       begin
         MessageBox(0,'Cant''t Find A Suitable PixelFormat.','Error',MB_OK or MB_ICONERROR);
         PostQuitMessage(0);  // This Sends A 'Message' Telling The Program To Quit
         exit;
       end;

       if (not SetPixelFormat(h_DC,PixelFormat,@pfd)) then
       begin
         MessageBox(0,'Can''t Set The PixelFormat.','Error',MB_OK or MB_ICONERROR);
         PostQuitMessage(0);
         exit;
       end;

       h_RC := wglCreateContext(h_DC);
       if (h_RC=0) then
       begin
         MessageBox(0,'Can''t Create A GL Rendering Context.','Error',MB_OK or MB_ICONERROR);
         PostQuitMessage(0);
         exit;
       end;

       if (not wglMakeCurrent(h_DC, h_RC)) then
       begin
         MessageBox(0,'Can''t activate GLRC.','Error',MB_OK or MB_ICONERROR);
         PostQuitMessage(0);
         exit;
       end;

       GetClientRect(hWnd, Screen);
       InitGL(Screen.right, Screen.bottom);
     end;

   WM_DESTROY, WM_CLOSE:
     begin
       ChangeDisplaySettings(DEVMODE(nil^), 0);

       wglMakeCurrent(h_DC,0);
       wglDeleteContext(h_RC);
       ReleaseDC(hWnd,h_DC);

       PostQuitMessage(0);
     end;

   WM_KEYDOWN:
     begin
       keys[wParam] := TRUE;
     end;

   WM_KEYUP:
     begin
       keys[wParam] := FALSE;
     end;

   WM_SIZE:
     begin
       ReSizeGLScene(LOWORD(lParam),HIWORD(lParam));
     end;

   else
   begin
     Result := DefWindowProc(hWnd, message, wParam, lParam);
     exit;
   end;
 end;
end;

function WinMain(hInstance: HINST; hPrevInstance: HINST; lpCmdLine: PChar; nCmdShow: integer): integer; stdcall;
var
 msg: TMsg;      // Windows Message Structure
 wc: TWndClass;  // Windows Class Structure Used To Set Up The Type Of Window
 h_Wnd: HWND;     // Storage For Window Handle
 dmScreenSettings: DEVMODE;

begin
 ZeroMemory(@wc, SizeOf(wc));

 wc.style      := CS_HREDRAW or CS_VREDRAW or CS_OWNDC;
 wc.lpfnWndProc    := @WndProc;
 wc.hInstance    := hInstance;
 wc.hCursor     := LoadCursor(0, IDC_ARROW);
 wc.lpszClassName  := 'OpenGL WinClass';

 if(RegisterClass(wc)=0) then
 begin
   MessageBox(0,'Failed To Register The Window Class.','Error',MB_OK or MB_ICONERROR);
   Result := 0;
   exit;
 end;

 h_Wnd := CreateWindow(
     'OpenGL WinClass',
     'Jeff Molofee''s GL Code Tutorial ... NeHe 2000',  // Title Appearing At The Top Of The Window
     WS_POPUP or
     WS_CLIPCHILDREN or
     WS_CLIPSIBLINGS,
     0, 0,                        // The Position Of The Window On The Screen
     640, 480,                       // The Width And Height Of The WIndow
     0,
     0,
     hInstance,
     nil
 );

 if (h_Wnd = 0) then
 begin
   MessageBox(0,'Window Creation Error.','Error',MB_OK or MB_ICONERROR);
   Result := 0;
   exit;
 end;

 ZeroMemory( @dmScreenSettings, sizeof( DEVMODE ) );
 dmScreenSettings.dmSize := sizeof( DEVMODE );
 dmScreenSettings.dmPelsWidth  := 640;        // Width
 dmScreenSettings.dmPelsHeight := 480;        // Height
 dmScreenSettings.dmFields     := DM_PELSWIDTH or DM_PELSHEIGHT;  // Color Depth
 ChangeDisplaySettings(dmScreenSettings, CDS_FULLSCREEN); // Switch To Fullscreen Mode

 ShowWindow(h_Wnd, SW_SHOW);
 UpdateWindow(h_Wnd);
 SetFocus(h_Wnd);

 while (true) do
 begin
   // Process All Messages
   while (PeekMessage(msg, 0, 0, 0, PM_NOREMOVE)) do
   begin
     if (GetMessage(msg, 0, 0, 0)) then
     begin
       TranslateMessage(msg);
       DispatchMessage(msg);
     end
     else
     begin
       Result := 1;
       exit;
     end;
   end;

   DrawGLScene();
   SwapBuffers(h_DC);

   if (keys[VK_ESCAPE]) then SendMessage(h_Wnd,WM_CLOSE,0,0);
 end;
end;

begin
 WinMain( hInstance, hPrevInst, CmdLine, CmdShow );
end.


Юзайте на здоровье.
Я там полистал уроки. Почти ко всем (если не ко всем) есть сорци на Дэлфи.

PM MAIL ICQ   Вверх
Borland_Delphi_6
Дата 24.7.2004, 18:19 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


LoneLINEss
****


Профиль
Группа: Участник Клуба
Сообщений: 2509
Регистрация: 5.11.2002
Где: in fortune dreams ...

Репутация: нет
Всего: 20



Cheba
Интересная вещь, спасибо!


--------------------
Blind Guardian Fan :: BMSTU Student :: A polar bear is a rectangular bear after a coordinate transform.

Мои фотографии
PM MAIL WWW   Вверх
Budy
Дата 24.7.2004, 20:02 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 616
Регистрация: 6.2.2004
Где: Екатеринбург

Репутация: 1
Всего: 2



Cool! Thanks!


--------------------
Как ты назовешь свой корабль, так на нем и напишут
user posted image
PM MAIL WWW ICQ   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
Правила форума "Delphi: Общие вопросы"
SnowyMetalFan
bemsPoseidon
Rrader

Запрещается!

1. Публиковать ссылки на вскрытые компоненты

2. Обсуждать взлом компонентов и делиться вскрытыми компонентами

  • Литературу по Дельфи обсуждаем здесь
  • Действия модераторов можно обсудить здесь
  • С просьбами о написании курсовой, реферата и т.п. обращаться сюда
  • Вопросы по реализации алгоритмов рассматриваются здесь
  • 90% ответов на свои вопросы можно найти в DRKB (Delphi Russian Knowledge Base) - крупнейшем в рунете сборнике материалов по Дельфи


Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, Snowy, MetalFan, bems, Poseidon, Rrader.

 
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | Delphi: Общие вопросы | Следующая тема »


 




[ Время генерации скрипта: 0.0573 ]   [ Использовано запросов: 22 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.